package com.weimei.conversionTreasure.weight;

import android.content.Context;
import android.content.Intent;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.NonNull;

import com.lxj.xpopup.core.BottomPopupView;
import com.weimei.conversionTreasure.R;
import com.weimei.conversionTreasure.activity.AddJxsActivity;
import com.weimei.conversionTreasure.activity.AddKhActivity;
import com.weimei.conversionTreasure.activity.JxsDetailActivity;
import com.weimei.conversionTreasure.activity.KhDetailActivity;

public class BottomKhAddPop extends BottomPopupView {

    private TextView kh,jxs;
    private ImageView cancel;
    private Context mContext;




    public BottomKhAddPop(@NonNull Context context) {
        super(context);
        this.mContext = context;
    }

    @Override
    protected int getImplLayoutId() {
        return R.layout.layout_bottom_kh_add;
    }

    @Override
    protected void onCreate() {
        cancel = findViewById(R.id.cancel);
        kh = findViewById(R.id.kh);
        jxs = findViewById(R.id.jxs);

        cancel.setOnClickListener(view -> dismiss());
        kh.setOnClickListener(view ->{
            mContext.startActivity(new Intent(mContext, AddKhActivity.class));
            dismiss();
        });

        jxs.setOnClickListener(view ->{
            mContext.startActivity(new Intent(mContext, AddJxsActivity.class));
            dismiss();
        });

    }



}
